package com.xbongbong.paas.pojo;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * @description:
 * @Author: hongxiao
 * @date: 2019-02-19 16:09
 * @since
 */
@Getter
@Setter
@ToString
public class KeyValuePojo implements Serializable {
    private static final long serialVersionUID = 2102942351046960506L;
    /**
     * 键
     */
    private String key;
    /**
     * 值
     */
    private Object value;
    /**
     * 排序字段，用不到则置空或不处理即可
     */
    private Integer sort;

    private String attr;

    private List<KeyValuePojo> products;

    public KeyValuePojo(Object value) {
        this.value = value;
    }

    public KeyValuePojo(String key, Object value) {
        this.key = key;
        this.value = value;
    }

    public KeyValuePojo(String key, Object value, String attr) {
        this.key = key;
        this.value = value;
        this.attr = attr;
    }

    public KeyValuePojo() {
    }
}
